/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package aptech.edu.ixj.interfaces;

import java.io.Serializable;

/**
 *
 * @author thanhtq
 */
public interface GenericDao<T, PK extends Serializable> {

    /**
     * create
     *
     * @param newInstance
     *            T
     * @return PK
     */
    PK create(T newInstance);

    /**
     * read
     *
     * @param id
     *            PK
     * @return T
     */
    T read(PK id);


    /**
     * update
     *
     * @param newInstance T
     */
    void update(T newInstance);

    /**
     * delete
     *
     * @param newInstance T
     */
    void delete(T persistentObject);
}
